From c2dec9b6fc475484a4431fd1726cab3dc412de3c Mon Sep 17 00:00:00 2001 From: oliskoli Date: Wed, 17 Sep 2008 19:38:41 +0000 Subject: [PATCH] waypt: Add function 'waypt_empty_gc_data' to test the state of waypoints gc_data. --- defs.h | 1 + waypt.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/defs.h b/defs.h index cb2590aaa..ae5fbcb8b 100644 --- a/defs.h +++ b/defs.h @@ -546,6 +546,7 @@ waypoint * find_waypt_by_name(const char *name); void waypt_backup(signed int *count, queue **head_bak); void waypt_restore(signed int count, queue *head_bak); geocache_data *waypt_alloc_gc_data(waypoint *wpt); +int waypt_empty_gc_data(const waypoint *wpt); route_head *route_head_alloc(void); void route_add (waypoint *); diff --git a/waypt.c b/waypt.c index 065f388dd..de4fa17e3 100644 --- a/waypt.c +++ b/waypt.c @@ -627,3 +627,9 @@ waypt_alloc_gc_data(waypoint *wpt) } return res; } + +int +waypt_empty_gc_data(const waypoint *wpt) +{ + return (wpt->gc_data == &empty_gc_data); +} -- 2.30.2